#include "plane.h"

namespace ray_tracing
{
	plane_t::plane_t(scene_object_t* in_parent, const vec3f& normal, float D, material_t* in_material)
		: scene_object_t(in_parent, in_material)
	{
		math_plane = plane3fc(normal, D);
	}

	collision::collision_info_t plane_t::intersect_with(const ray3f& ray, hit_param)
	{
		return collision::test_collision(ray, math_plane);
	}
}